package cn.edu.scau.cmi.chenruilin.singleton;

public class Chairman {
	private static Chairman instance;
	private static String name;
	public Chairman(String name) {
		this.name = name;
	}
	public static Chairman getInstance(String name) {
		if(instance == null && !name.equals(null)) {
			instance = new Chairman(name);
		}
		return instance;
	}
	public String getName() {
		return name;
	}
	public String toString() {
		return name + getClass().getName() + '@' + Integer.toHexString(hashCode());
	}
	
	public static void reset(){
		instance = null;
	}
}



